<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
  <th:block th:include="include :: header('审核本级回复处理-信件')"/>
</head>
<body style="background-color: #F4F6FA">
<div>
  <div class="tabs-container">
    <ul class="nav nav-tabs" style="background-color: white;position: relative">
      <li class="active"><a data-toggle="tab" th:href="@{'/system/mMailWF/rCity/listSonNABack'}" aria-expanded="true">待处理</a></li>
      <li><a data-toggle="tab" th:href="@{'/system/mMailWF/rCity/listSonABack'}" aria-expanded="false">已处理</a></li>
      <!--<li><a data-toggle="tab" th:href="@{'/system/mMailWF/rCity/listAllSonABack'}" aria-expanded="false">全退工单</a></li>-->
    </ul>
    <div class="tab-content">
      <div class="tab-pane active">
        <iframe id="navFrame" width="100%" scrolling="no" th:src="@{'/system/mMailWF/rCity/listSonNABack'}" frameborder="0" seamless></iframe>
      </div>
    </div>
  </div>
</div>
<th:block th:include="include :: footer"/>
<script>
  $("#navFrame").on("load",loadIframe);

  $(document).ready(function () {
    $(".nav-tabs li>a").click(function (e) {
      if ($(this).attr("href").length && this.parentNode.className.indexOf('active') == -1) {
        e.preventDefault();
        $(this).parent('li').addClass('active').siblings().removeClass('active');
        loadIframe();
        $("#navFrame").attr("src", $(this).attr("href"));
      }
    })
  });

  function loadIframe() {//iframe加载完后 高度自适应。
    $("#navFrame").height(0);
    var navFrame = document.getElementById("navFrame").contentDocument || document.getElementById("navFrame").contentWindow.document,
            mainWrapHeight = $(window).height() - 49 - 21,
            frame_height = navFrame.documentElement.scrollHeight;
    $("#navFrame").height(frame_height < 589 ? mainWrapHeight : frame_height+20);
  }
</script>
</body>
</html>